import request from '@/utils/request';

export default {
    /**
     * 条件+模糊+分页查询顾客信息
     * @param {顾客查询VO对象} customerQueryVO 
     * @returns 
     */
    getPage(customerQueryVO){
        return request({
            url: `/customer/page`,
            method: 'post',
            data: customerQueryVO
        })
    },
    /**
     * 根据顾客ID查询对象
     * @param {顾客信息} customer 
     * @returns 
     */
    updateCustomerById(customer){
        return request({
            url: `/customer`,
            method: 'put',
            data: customer
        })
    },
    /**
     * 根据顾客Ids查询对象
     * @param {顾客Ids} customerIds 
     */
    deleteCustomerByIds(customerIds){
        return request({
            url: `/customer`,
            method: 'delete',
            data: customerIds
        })
    },
    /**
     * 添加新顾客
     * @param {顾客} customer 
     */
    addCustomer(customer){
        return request({
            url: `/customer`,
            method: 'post',
            data: customer
        })
    },
    /**
     * 获取所有的顾客信息
     */
    getList(){
        return request({
            url: `/customer`,
            method: 'get',
        })
    }
}

